define [
  'models/base/model'
], (Model) ->

  'use strict'

  class UserModel extends Model

    # Override Attributes
    # =============================================================

    urlRoot: window.AppData.API_URL + '/usuario'

    # Override Methods
    # =============================================================

    toJSON: ->
      attrs       = _.clone this.attributes
      attrs.senha = attrs.password if attrs.password and !attrs.senha

      delete attrs.senha if attrs.id
      delete attrs.password
      delete attrs.id
      delete attrs.ativo


      return attrs

    # Additional Methods
    # =============================================================
